let template = {
  name: 'iconfont',
  props: {
    name: {
      type: String,
      default: '',
    },
  },
  template: '',
}

export default {
  async load() {
    const { name } = template

    return fetch(`${config.RP}/templates/${name}/${name}.html`)
      .then((res) => res.text())
      .then((html) => {
        template.template = html
        window.app.component(name, template)
      })
  },
}
